﻿using Newtonsoft.Json;
using FreeSql.DataAnnotations;
using PropertyChanged;
using System.Collections.Generic;
using System.Reflection;
using System;
using System.Linq;
using System.Collections.ObjectModel;
using sys_Print.Models;

namespace sys_Print.DataAsset
{
    [AddINotifyPropertyChangedInterface]
    [JsonObject(MemberSerialization.OptIn)]
    public partial class TaskInfo
    {

        [JsonProperty, Column(Name = "accuracy")]
        public string Accuracy { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "communication")]
        public string Communication { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "communication_method")]
        public string CommunicationMethod { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "contract_id", DbType = "varchar(255)")]
        public string ContractId { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "control_accuracy")]
        public string ControlAccuracy { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "customer_no", DbType = "varchar(80)")]
        public string CustomerNo { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "customer", DbType = "varchar(80)")]
        public string Customer { get; set; } = string.Empty;

        [JsonProperty]
        public int? DN { get; set; }

        [JsonProperty, Column(Name = "electrode")]
        public string Electrode { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "ex_type")]
        public string ExType { get; set; } = string.Empty;

        [JsonProperty, Column(DbType = "varchar(255)")]
        public string FBillNo { get; set; } = string.Empty;

        [JsonProperty, Column(DbType = "varchar(80)")]
        public string FNumber { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "header")]
        public string Header { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "header_version")]
        public string HeaderVersion { get; set; } = string.Empty;

        [JsonProperty]
        public string IC { get; set; } = string.Empty;

        [JsonProperty, Column(DbType = "nvarchar(706)")]
        public string INQRCode { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "installation_method")]
        public string InstallationMethod { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "lining")]
        public string Lining { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "meter_core")]
        public string MeterCore { get; set; } = string.Empty;

        [JsonProperty, Column(DbType = "varchar(45)")]
        public string MFGDate { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "model", DbType = "varchar(50)")]
        public string Model { get; set; } = string.Empty;

        [JsonProperty]
        public string PN { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "power_supply")]
        public string PowerSupply { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "pressure")]
        public string Pressure { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "product_name", DbType = "nvarchar(50)")]
        public string ProductName { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "qty", DbType = "varchar(30)")]
        public string Qty { get; set; } = string.Empty;

        [JsonProperty, Column(DbType = "varchar(255)")]
        public string QYS { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "sales_no", DbType = "nvarchar(258)")]
        public string SalesNo { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "selection_code", DbType = "varchar(255)")]
        public string SelectionCode { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "Exd", DbType = "varchar(255)")]
        public string Exd { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "Exi", DbType = "varchar(255)")]
        public string Exi { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "IP", DbType = "varchar(255)")]
        public string IP { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "FDocumentNumber", DbType = "varchar(255)")]
        public string FDocumentNumber { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "structure")]
        public string Structure { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "task_no", DbType = "varchar(12)")]
        public string TaskNo { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "temperature")]
        public string Temperature { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "two_sets_valves")]
        public string TwoSetsValves { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "wireless_module")]
        public string WirelessModule { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "medium_temperature")]
        public string MediumTemperature { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "ambient_temperature")]
        public string AmbientTemperature { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "logo")]
        public string Logo { get; set; } = string.Empty;
        
        [JsonProperty, Column(Name = "q_name")]
        public string QName { get; set; } = string.Empty;

        [JsonProperty]
        public string WP { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "meter_K_Unit")]
        public string MeterKUnit { get; set; } = string.Empty;

        [Column(IsIgnore = true)]
        public List<Meter> Meters { get; set; }

    }

}
